LuxBot
LuxBot is a practical Discord bot allowing users to display charts, get news, and even perform backtests by using simple slash commands. Commands can be accessed by typing /
on a supported channel. Commands have the following form:
/command_name parameter1 parameter2 ...
Commands can have one or multiple parameters that determines the command final output, parameters are given a value by the user. Some parameters are optionals and generally posses a predefined value, this is specified when typing the command.
info
On this page optional parameters are denoted using the *
character before the parameter name.
/command_name not_optional *optional
help
/help command
the /help
command allows getting information regarding specific commands in the bot, e.g:
/help ha
backtesting
Backtesting commands allows backtesting various built-in strategies using a specific symbol and timeframe. The backtest is performed using the most recent 1000 bars and assumes no frictional costs.
The returned results include various metrics such: number of trades executed, final equity, equity peak, maximum drawdown, win rate, worst trade, and profit factor.
A new long position automatically closes a previous short position, while a new short position automatically closes a previous long position.
Supported timeframes includes: '1min', '5min', '15min', '30min', '45min', '1h', '2h', '4h', '8h', and '1day'. The backtest command covers a wide range of stocks, forex pairs, indices, and cryptocurencies.
info
Exchanges for stocks and cryptocurrencies can be specified by adding it after the ticker while separated by a semicolon (all-caps), for example: BTC/USD:BITFINEX
. Not all exchanges are supported.
Information about each strategy can be found below.
backtesting_macross
The macross
strategy is a simple moving average crossover strategy, users can define the type of moving averages alongside their periods, the macross
syntax is defined as follows:
/backtesting_macross symbol timeframe fastma_type fastma_period slowma_type slowma_period
e.g:
/backtesting_macross GOOG 15min SMA 14 SMA 28
The strategy opens a long position when the fast moving average crossover the slow one, and a short position when the fast moving average cross under the slow one.
Available moving average types include:
Full Name | Syntax |
---|---|
Simple Moving Average | SMA |
Exponential Moving Average | EMA |
Weighted Moving Average | WMA |
Double Exponential Moving Average | DEMA |
Triple Exponential Moving Average | TEMA |
Triangular Moving Average | TRIMA |
T3 | T3 |
Kaufman Adaptive Moving Average | KAMA |
backtesting_supertrend
The supertrend
strategy is a strategy based on the Supertrend indicator, the supertrend
syntax is defined as follows:
/backtesting_supertrend symbol timeframe factor period
e.g:
/backtesting_supertrend GOOG 15min supertrend 4 7
The strategy opens a long position when the price crossover the supertrend, and a short position when the price cross under the supertrend.
backtesting_macd
The macd
strategy is a strategy based on the MACD indicator, the macd
syntax is defined as follows:
/backtesting_macd fast_period slow_period hist_period
e.g:
/backtesting_macd GOOG 15min 50 14 9
The strategy opens a long position when the MACD histogram crossover 0, and a short position when the histogram cross under 0.
backtesting_sar
The sar
strategy is a strategy based on the SAR indicator, the sar
syntax is defined as follows:
/backtesting_sar symbol timeframe acceleration maximum
e.g:
/backtesting_sar GOOG 15min sar 0.02 0.02
The strategy opens a long position when the price crossover the SAR, and a short position when the price cross under the SAR.
backtesting_rsi
The rsi
strategy is a strategy based on the RSI indicator, the rsi
syntax is defined as follows:
/backtesting_rsi length upper lower
e.g:
/backtesting_rsi GOOG 15min 14 80 20
The strategy opens a long position when the RSI cross under the lower level, and a short position when the RSI cross over the upper level.
backtesting_stochastic
The stochastic
strategy is a strategy based on the Stochastic indicator, the stochastic
syntax is defined as follows:
/backtesting_stochastic symbol timeframe fastk slowk slowd
e.g:
/backtesting_stochastic GOOG 15min 50 20 7
The strategy opens a long position when the Stochastic slow K crossover the Stochastic Slow D, and a short position when the Stochastic slow K cross under the Stochastic Slow D.
backtesting_turtle
The turtle
strategy is a strategy based on the Donchian Channel indicator, the turtle
syntax is defined as follows:
/backtesting_turtle symbol timeframe length
e.g:
/backtesting_turtle GOOG 15min 14
The strategy opens a long position when the high price is equal to the upper extremity of the Donchian Channel, and a short position when the low price is equal to the lower extremity of the Donchian Channel
backtesting_momentum
The momentum
strategy is a strategy based on the Momentum indicator, the momentum
syntax is defined as follows:
/backtesting_momentum symbol timeframe length
e.g:
/backtesting_ GOOG 15min momentum 14
The strategy opens a long position when the momentum oscillator crossover 0, and a short position when the momentum oscillator cross under 0.
backtesting_bbands
The bbands
strategy is a strategy based on the Bollinger Bands indicator, the bbands
syntax is defined as follows:
/backtesting_bbands symbol timeframe length mult
e.g:
/backtesting_bbands GOOG 15min 20 2
The strategy opens a long position when the price crossover the upper extremity of the Bollinger Bands, and a short position when the price cross under the lower extremity of the Bollinger Bands.
book
/book quote base
Returns the image of a Coinbase order book depth chart of a specific cryptocurrency.
/book btc usd
chart
/chart symbol timeframe *indicators
The /chart
command allows getting the image of a tradingview chart of the requested symbol and timeframe.
The user can optionally request indicators to be displayed, e.g:
/chart BTCUSD 15 MACD RSI BB
The above command would display a Bitcoin chart using the 15min timeframe with the MACD, RSI, and BB indicators. The name of the indicators are not case sensitive, you can see the list of supported indicators and their command syntax below:
Full Name | Name For The Command |
---|---|
Accumulation Distribution | accd |
Advance Decline Ratio | adr |
AROON | aroon |
Average True Range | atr |
Awesome Oscillator | ao |
Bollinger Bands | bb |
Bollinger Bands %B | %b |
Bollinger Bands Width | bbw |
Chaikin Money Flow | cmf |
Chaikin Oscillator | chaikin |
Chande Momentum | cmo |
ChoppinessIndex | ci |
Commodity Channel Index | cci |
Connors RSI | crsi |
Correlation Coefficient | cor |
Detrended Price Oscillator | dpo |
Directional Movement | dm |
Donchian Channels | don |
Double EMA | dema |
Ease Of Movement | eom |
Elder's Force Index | efi |
Envelopes | env |
Fisher Transform | fisher |
Historical Volatility | hv |
Hull Moving Average | hull |
Ichimoku Cloud | ichimoku |
Keltner Channels | kc |
Know Sure Thing | kst |
Linear Regression | linreg |
Moving Average Convergence Divergence | macd |
Momentum | mom |
Money Flow | mf |
Moon Phases | moon |
Simple Moving Average | sma |
Exponential Moving Average | ema |
Weighted Moving Average | wma |
On Balance Volume | obv |
Parabolic SAR | sar |
Pivot Points High Low | pivot hl |
Pivot Points Standard | pivot |
Price Oscillator | ppo |
Price Volume Trend | pvt |
Rate of Change | roc |
Relative Strength Index | rsi |
Vigor Index | vigor |
Volatility Index | vi |
SMI Ergodic Indicator | smii |
SMI Ergodic Oscillator | smio |
Stochastic Oscillator | stoch |
Stochastic RSI | stochrsi |
Triple EMA | tema |
Trix Oscillator | trix |
Ultimate Oscillator | uo |
Volatility Stop | vstop |
VWAP | vwap |
Volume Weighted Moving Average | vwma |
William %R | %R |
ha
/ha symbol timeframe *indicators
The /ha
command works like the /chart
command but will return the image of a Heikin-Ashi chart instead of regular candles.
dividends
/dividends symbol
Returns the amount of dividends paid out for the last 10+ years for a specific stock.
earnings
/earnings symbol
Returns data for a given company most recent earnings, including earning date, time (if supplied), estimated earning, actual earning, the difference between the actual and estimated earning, and the surprise (%) of the actual earning related to its estimate.
ipo
/ipo *start
Returns the list of companies with the most recent upcoming IPO in the NASDAQ exchange. Users can optionally select a starting date for the most recent upcoming ipo's, the date should be in the format year-month-day.
news
/news keyword *source
The /news
command returns the link of a random recent news related to the requested keyword. A source website can be optionally specified, e.g: /news bitcoin coindesk
.
quote
/quote symbol *timeframe
Returns ohlc prices, as well as price change and volume (if available) of the selected symbol over an optional timeframe. If not timeframe are specified, the daily timeframe will be used by default.
sentiment
/sentiment symbol timeframe
Returns the technical analysis sentiment of a given symbol and optional timeframe.